package com.wj.console.common.util;

public class ResultCodeUtil {
    
	public static final int SUCC = 0;
	
	public static final int UNLOGIN = 0xFFFF;
	
	/**
	 * 充值需要短信验证
	 */
	public static final int CHARGE_NEED_SMS_CODE = 0x2301;
	
	/**
	 * 
	 * @Description: 根据code获取对应文字信息
	 * @param code
	 * @return
	 * @return String
	 * @throws
	 */
	public static final String getResultCodeMsg(int code){
		switch(code){
			case SUCC: return "操作成功";
			case UNLOGIN: return "请重新登录";
			
			case 0x1201: 
			case 0x1301: 
				return "短信发送频率过快";
			case 0x1202: 
			case 0x1302: 
				return "短信发送失败";
			case 0x1203: 
			case 0x1303: 
				return "保存数据库失败";
			case 0x1204: 
			case 0x1304: 
			case 0x1401: 
			case 0x1904: 
				return "手机号格式 不对";
			case 0x1402: 
			case 0x1502: 
			case 0x1603: 
				return "密码格式不对";
			case 0x1305:
				return "该手机号不存在";
			case 0x1205: 
			case 0x1403: 
				return "手机号已存在";
			case 0x1404: 
			case 0x1604: 
				return "验证码错误";
			case 0x1405: 
			case 0x1605: 
				return "验证码过期";
			case 0x1406: 
			case 0x1606: 
				return "验证码已使用";
			case 0x1407: 
				return "保存失败";
			case 0x1501: 
				return "旧密码为空";
			case 0x1503: 
				return "旧密码错误";
			
				
			case 0x1701: 
				return "已经认证通过";
			case 0x1702:
				return "非法名字";
			case 0x1704:
				return "身份证已存在";
			case 0x1705: 
				return "身份证不合法";
			case 0x1706: 
				return "实名认证提交次数已达上限，请联系客服。";
				
			case 0x1903: 
				return "姓名格式错误";
			case 0x1703: 
				return "身份证格式错误";
				
			
			case 0x1801: 
			case 0x1901: 
				return "已经绑定银行卡";
			case 0x2403:
				return "未绑定提现银行卡";
			case 0x1802: 
			case 0x1902: 
				return "尚未认证身份证";
			case 0x1905: 
				return "银行卡号无效";
	
			case 0x3301:
			case 0x3401: 
				return "投资未找到";
			
			case 0x1001:
			case 0x1601:
				return "手机号为空";
			case 0x1002: 
				return "密码为空";
			case 0x1003: 
			case 0x1602: 
				return "用户不存在";
			case 0x1004: 
				return "密码错误";
			case 0x1101: 
				return "尚未登录";
				
			case 0x2001: 
			case 0x2101: 
				return "项目未找到";
			case 0x2002: 
			case 0x2102: 
			case 0x2202: 
				return "项目终止日期已过";
			case 0x2003: 
				return "项目已满";
			case 0x2201: 
				return "项目不存在";
			case 0x2203: 
				return "非法金额";
			case 0x2204: 
				return "投资金额大于可投资金额";
			case 0x2205: 
			case 0x3101: 
				return "获取用户剩余金额错误";
			case 0x2206: 
				return "用户剩余金额不足";
			case 0x2207: 
				return "第三方支付接口错误";
			case 0x1504:
				return "交易密码和登录密码不能一致";
			//充值
			case 0x2303:
				return "尚未进行身份验证";
			case 0x2304:
				return "绑卡失败";
			case 0x2305:
				return "支付失败";
			case 0x2302:
				return "需要交易密码";
			case 0x2208://投资
			case 0x2402://提现
				return "交易密码不正确";
			case 4101://提现
				return "该账户已冻结，请联系客服";
			case 9217://提现
				return "低于50元无法提现";
			
			
			default: return "错误代码(" + code + ")，请和客服联系";
		}
	}
	
}
